<?php 
if (!empty($this->flash_messages))
{
    foreach ($this->flash_messages as $flash_message)
    {
        echo '<div class="message">'.$flash_message.'</div>';
    }
}
?>
<h1 class="caption"><?php echo Zend_Registry::get('locale')->_('Tags') ?></h1>


<?php if (!empty($this->tags)) : ?>
    <?php foreach ($this->tags as $tag) : ?>
      <div class="node-item">
        <a href="<?php echo $this->fixUrl('tag/'.$tag) ?>"><?php echo htmlspecialchars($tag) ?></a>
        <?php if (Zend_Registry::get('user')->canManage()) : ?>
        <div class="node-links">
            <a class="delete" href="javascript:if(confirm('<?php echo Zend_Registry::get('locale')->_('Are you sure ?')?>')){window.location.href='<?php echo $this->fixUrl('tags/delete/'.$tag->id) ?>'}"><?php echo Zend_Registry::get('locale')->_('Delete') ?></a>
        </div>
        <?php endif; ?>
        <div class="clear"></div>
      </div>
    <?php endforeach; ?>
<?php endif; ?>

<?php echo $this->paginator ?>
